#!/bin/bash
. ~/.bash_profile

start() {
	for _es in $(ls -d ~/*.es); do
		~/$_es/bin/elasticsearch -d
	done
}


clean() {
	for _es in $(ls -d *.es); do
		rm -rf ~/$_es/logs/*
	done
}

usage() {
	echo "usage: escmd start|clean|usage"
}

case $1 in
	start)
		start
	;;
	clean)
		clean
	;;
	*)
		usage
	;;
esac

